home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 14 July 1996
- // Author: jb
- //
- //
- // Procedure Name:
- // EditMenu
- //
- // Description:
- // This procedure creates the main menubar Edit menu.
- //
- // Input Arguments:
- // Parent window that menu will be a part of.
- //
- // Return Value:
- // None.
- //
-
- global proc deleteSelectRigidBodies()
- //
- // Deletes all the rigid bodies associated
- // with the selected items.
- //
- {
- string $selectedItems[] = `ls -sl`;
-
- for ($i = 0; $i < size( $selectedItems ); $i++)
- {
- string $leaves[] = `ls -dag -leaf -showType $selectedItems[$i]`;
-
- // Delete all the selected rigid bodies.
- //
- for ($j = 0; $j < size( $leaves ); $j += 2)
- {
- if ($leaves[$j+1] == "rigidBody")
- {
- delete $leaves[$j];
- }
- }
- }
- }
-
- global proc defineCharacter( )
- //
- // Procedure Name:
- // defineCharacter
- //
- // Description:
- // Creates a set using the selected items,
- // so that users can define all the nodes
- // in the DAG that make up their "characters".
- //
- // Input Arguments:
- // None.
- //
- // Return Value:
- // None.
- {
- // Prompt the user for a new character name
- //
- string $result = `promptDialog
- -title "Create Quick Select Set"
- -message "Enter Quick Select Set name:"
- -text "Set"
- -button "OK"
- -button "Cancel"
- -defaultButton "OK"
- -cancelButton "Cancel"
- -dismissString "Cancel"`;
-
- // If the result was "OK", then proceed
- //
- if ( $result == "OK" ) {
-
- // Also, notice that the `type` is being set
- // to "gCharacterSet" - just trying to pick
- // a name that users probably won't type
- //
- string $characterName = `promptDialog -q`;
- sets -text "gCharacterSet" -name $characterName;
-
- }
- }
-
-
- global proc createCharacterMenu( string $parent )
- //
- // Creates entries in the "Select Character" subMenu
- // in the Edit Menu.
- {
- setParent -m $parent;
- menu -e -dai $parent;
-
- // Get a list of all character sets in the
- // system, then generate an entry per set
- //
- string $charSets[] = `ls -sets`;
-
- for( $character in $charSets )
- {
- if( `sets -q -t $character` == "gCharacterSet" )
- {
- menuItem -l $character -c ( "select -r " + $character );
- }
- }
-
- if( `menu -q -ni $parent` == 0 )
- //
- // No characters defined - create a default menu item
- // to inform the user
- {
- menuItem -l "No Quick Select Sets Defined" -enable false;
- }
- }
-
-
- global proc editMenuUpdate( string $parent ) {
-
- string $lastName;
-
- // Get the name of the recent command
- string $label[] = `repeatLast -cnl 1`;
- if (size($label) <= 0) {
- menuItem -e -l "Repeat" -enable false ( $parent + "|lastAgainItem" );
- } else {
- $label[0] = makeStringSingleLine( $label[0] );
- $lastName = "Repeat \"" + $label[0] + "\"";
- menuItem -e -l $lastName -enable true ( $parent + "|lastAgainItem" );
- }
- }
-
- global proc buildEditMenu ( string $parent ) {
- int $dimWhenNoSelect = 0;
- int $completeLicense = `licenseCheck -m "edit" -typ "complete"`;
-
- setParent -menu $parent;
-
- if( `menu -q -ni $parent` != 0 ) {
- //
- // Menu is built already - just return
- //
- return;
- }
-
- menuItem -label "Undo"
- -ecr false
- -annotation "Undo: Undo the last action"
- -command ("Undo") undoItem;
- if( $dimWhenNoSelect )
- dimWhen -f "UndoAvailable" ($parent+"|undoItem");
-
- menuItem -label "Redo"
- -ecr false
- -annotation "Redo: Redo the last undone action"
- -command ("Redo") redoItem;
- if( $dimWhenNoSelect )
- dimWhen -f "RedoAvailable" ($parent+"|redoItem");
-
- menuItem -label "Repeat"
- -ecr false -enable false -command ("RepeatLast")
- -annotation "Repeat: Repeat the last action"
- lastAgainItem;
- scriptJob -permanent -parent $parent
- -event "RecentCommandChanged" ( "editMenuUpdate " + $parent );
-
- menuItem -label "Recent Commands..."
- -ecr false
- -annotation "Recent Commands: Show a list of recent menu commands"
- -command ("RecentCommandsWindow");
-
- menuItem -divider true;
-
- menuItem -l "Cut"
- -annotation "Cut: Cut the selected object(s)"
- -command ("CutSelected") cutItem;
-
- menuItem -l "Copy"
- -annotation "Copy: Copy the selected object(s)"
- -command ("CopySelected") copyItem;
-
- menuItem -l "Paste"
- -annotation "Paste: Paste the selected object(s)"
- -command ("PasteSelected") pasteItem;
-
- menuItem -divider true;
-
- // Keys sub-menu.
- //
- menuItem -label "Keys" -subMenu true -aob true -to true cutKeyHierItem;
-
- menuItem -label "Cut Keys"
- -annotation "Cut Keys: Remove keys and place on animation clipboard"
- -command ("CutKeys")
- -dragMenuCommand "performCutKeyArgList 1 {\"2\", \"animationList\", \"0\"}" cutKeyItem;
- menuItem -optionBox true
- -annotation "Cut Keys Option Box"
- -label "Cut Keys Option Box"
- -command ("CutKeysOptions")
- cutKeyDialogItem;
-
- menuItem -label "Copy Keys"
- -annotation "Copy Keys: Copy keys and place on animation clipboard"
- -command ("CopyKeys")
- -dragMenuCommand "performCopyKeyArgList 1 {\"2\", \"animationList\", \"0\"}" copyKeyItem;
- menuItem -optionBox true
- -annotation "Copy Keys Option Box"
- -label "Copy Keys Option Box"
- -command ("CopyKeysOptions")
- copyKeyDialogItem;
-
- menuItem -label "Paste Keys"
- -annotation "Paste Keys: Paste keys from animation clipboard"
- -command ("PasteKeys")
- -dragMenuCommand "performPasteKeyArgList 1 {\"2\", \"animationList\", \"0\"}" pasteKeyItem;
- menuItem -optionBox true
- -annotation "Paste Keys Option Box"
- -label "Paste Keys Option Box"
- -command ("PasteKeysOptions")
- pasteKeyDialogItem;
-
- menuItem -label "Delete Keys"
- -annotation "Delete Keys: Delete keys but do not place on animation clipboard"
- -command ("DeleteKeys")
- -dragMenuCommand "performClearKeyArgList 1 {\"2\", \"animationList\", \"0\", \"0\"}" clearKeyItem;
- menuItem -optionBox true
- -annotation "Delete Keys Option Box"
- -label "Delete Keys Option Box"
- -command ("DeleteKeysOptions")
- clearKeyDialogItem;
-
- menuItem -label "Scale Keys"
- -annotation "Scale Keys: Scale keyed animation in time and/or value"
- -command ("ScaleKeys")
- -dragMenuCommand "performScaleKeyArgList 1 {\"2\", \"animationList\", \"0\"}" scaleKeyItem;
- menuItem -optionBox true
- -annotation "Scale Keys Option Box"
- -label "Scale Keys Option Box"
- -command ("ScaleKeysOptions")
- scaleKeyDialogItem;
-
- menuItem -label "Snap Keys"
- -annotation "Snap Keys: Snap keys to integer times"
- -command ("SnapKeys")
- -dragMenuCommand "performSnapKeyArgList 1 { \"2\", \"animationList\", \"0\" }"
- snapKeyItem;
- menuItem -optionBox true
- -annotation "Snap Keys Option Box"
- -label "Snap Keys Option Box"
- -command ("SnapKeysOptions")
- snapKeyDialogItem;
-
- menuItem -divider true;
-
- menuItem -label "Bake Simulation"
- -command ("BakeSimulation")
- -annotation "Bake Simulation: Bake existing animation into keys"
- -dragMenuCommand "performBakeSimulationArgList 1 {\"2\", \"animationList\"}"
- bakeSimulationItem;
- menuItem -optionBox true
- -annotation "Bake Simulation Option Box"
- -label "Bake Simulation Option Box"
- -command ("BakeSimulationOptions")
- bakeSimulationDialogItem;
-
- setParent -menu ..;
-
- menuItem -divider true;
-
- menuItem -l "Delete"
- -annotation "Delete: Delete the selected object(s)"
- -command ("Delete") clearItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|clearItem");
-
- // Delete by Type sub-menu.
- //
- menuItem -label "Delete by Type"
- -subMenu true -allowOptionBoxes true -to true
- clearActiveItem;
-
- menuItem -l "History"
- -annotation "Delete History: Delete construction history on the selected object(s)"
- -command ("DeleteHistory")
- clearConstHistoryTypesItem;
-
- menuItem -divider true;
-
- menuItem -label "Channels" -allowOptionBoxes true
- -annotation "Delete Channels: Delete channels on the selected object(s)"
- -command ("DeleteChannels")
- clearChannelsTypesItem;
- menuItem -optionBox true
- -annotation "Delete Channels Option Box"
- -label "Channels Option Box"
- -command ("DeleteChannelsOptions")
- clearAllChannelsDialogItem;
-
- menuItem -label "Static Channels" -allowOptionBoxes true
- -annotation "Delete Static Channels: Delete static channels on the selected object(s)"
- -command ("DeleteStaticChannels")
- clearStaticTypesItem;
- menuItem -optionBox true
- -annotation "Delete Static Channels Option Box"
- -label "Static Channels Option Box"
- -command ("DeleteStaticChannelsOptions")
- clearAllStaticChannelsDialogItem;
-
- menuItem -label "Motion Paths"
- -annotation "Delete Motion Paths: Delete motion paths on the selected object(s)"
- -command ("DeleteMotionPaths")
- clearMotionPathTypesItem;
-
- menuItem -label "Non-particle Expressions" -allowOptionBoxes true
- -annotation "Delete Non-particle Expressions: Delete non-particle expressions on the selected object(s)"
- -command ("DeleteExpressions")
- clearExpressionTypesItem;
- menuItem -optionBox true
- -annotation "Delete Non-particle Expressions Option Box"
- -label "Non-particle Expressions Option Box"
- -command ("DeleteExpressionsOptions")
- clearAllExpressionsDialogItem;
-
- menuItem -label "Constraints"
- -annotation "Delete Constraints: Delete constraints on the selected object(s)"
- -command ("DeleteConstraints")
- clearConstraintTypesItem;
-
- // Sounds sub-menu.
- //
- string $soundMenu = `menuItem -l "Sounds"
- -subMenu true
- -allowOptionBoxes false deleteSoundSubMenuItem`;
-
- menuItem -e -pmc (
- "updateSoundMenu { " +
- "\"" + $soundMenu + "\", " +
- "\"0\", " +
- "\"delete %s\", " +
- "\"Delete sound node %s\" " +
- "};"
- )
- $soundMenu;
-
- setParent -menu ..;
-
- menuItem -divider true;
-
- if(`licenseCheck -m edit -type complete` == 1)
- {
- menuItem -label "Rigid Bodies"
- -annotation "Delete Rigid Bodies: Delete rigid bodies on the selected object(s)"
- -command ("DeleteRigidBodies")
- clearRigidBodyTypesItem;
- }
- setParent -menu ..;
-
- // Delete all by Type sub-menu.
- //
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|clearActiveItem");
-
- menuItem -label "Delete All by Type"
- -subMenu true -allowOptionBoxes false -to true clearAllTypesItem;
-
- menuItem -label "History"
- -annotation "Delete All History: Delete History on all objects"
- -command ("DeleteAllHistory")
- clearAllHistoryTypesItem;
-
- menuItem -divider true;
-
- menuItem -label "Channels"
- -annotation "Delete All Channels"
- -command ("DeleteAllChannels")
- clearAllChannelsItem;
-
- menuItem -label "Static Channels"
- -annotation "Delete All Static Channels"
- -command ("DeleteAllStaticChannels")
- clearAllStaticTypesItem;
-
- menuItem -label "Clips"
- -annotation "Delete All Clips"
- -command ("DeleteAllClips")
- clearAllClipsItem;
-
- menuItem -label "Motion Paths"
- -annotation "Delete All Motion Paths"
- -command ("DeleteAllMotionPaths")
- clearAllMotionPathsItem;
-
- menuItem -label "Non-particle Expressions"
- -annotation "Delete All Non-particle Expressions"
- -command ("DeleteAllExpressions")
- clearAllExprTypesItem;
-
- menuItem -label "Constraints"
- -annotation "Delete All Constraints"
- -command ("DeleteAllConstraints")
- clearAllConstraintTypesItem;
-
- menuItem -label "Sounds"
- -annotation "Delete All Sounds"
- -command ("DeleteAllSounds")
- clearAllSoundsItem;
-
- menuItem -divider true;
-
- menuItem -label "Joints"
- -annotation "Delete All Joints"
- -command ("DeleteAllJoints")
- clearAllJointTypeItem;
-
- menuItem -label "IK Handles"
- -annotation "Delete All IK Handles"
- -command ("DeleteAllIKHandles")
- clearAllIKHandleTypeItem;
-
- menuItem -divider true;
-
- menuItem -label "Lattices"
- -annotation "Delete All Lattices"
- -command ("DeleteAllLattices");
-
- if ($completeLicense) {
- menuItem -label "Clusters"
- -annotation "Delete All Clusters"
- -command ("DeleteAllClusters");
- menuItem -label "Sculpt Objects"
- -annotation "Delete All Sculpt Objects"
- -command ("DeleteAllSculptObjects");
- }
-
- menuItem -label "Nonlinears"
- -annotation "Delete All Nonlinear Deformers"
- -command ("DeleteAllNonLinearDeformers");
-
- if ($completeLicense) {
- menuItem -label "Wires"
- -annotation "Delete All Wires"
- -command ("DeleteAllWires");
- }
-
- menuItem -divider true;
-
- menuItem -label "Lights"
- -enable true
- -annotation "Delete All Lights"
- -command ("DeleteAllLights")
- clearAllLightsTypesItem;
-
- menuItem -label "Cameras"
- -enable true
- -annotation "Delete All Cameras"
- -command ("DeleteAllCameras")
- clearAllCamerasTypesItem;
-
- menuItem -label "Image Planes"
- -annotation "Delete All Image Planes"
- -command ("DeleteAllImagePlanes")
- clearAllImagePlanesTypesItem;
-
- menuItem -label "Shading Groups and Materials"
- -enable true
- -annotation "Delete All Shading Groups and Materials"
- -command ("DeleteAllShadingGroupsAndMaterials")
- clearAllMaterialTypesItem;
-
- menuItem -divider true;
-
- if( `licenseCheck -m edit -type complete` == 1 )
- {
- menuItem -label "Particles"
- -annotation "Delete All Particles"
- -command ("DeleteAllParticles")
- selParticlesItem;
-
- menuItem -label "Rigid Bodies"
- -annotation "Delete All Rigid Bodies"
- -command ("DeleteAllRigidBodies")
- selRigidBodiesItem;
-
- menuItem -label "Rigid Constraints"
- -annotation "Delete All Rigid Constraints"
- -command ("DeleteAllRigidConstraints")
- selRigidConstraintsItem;
- }
- if( fluidEditLicenseFound() ) {
- menuItem -label "Fluids"
- -annotation "Delete All Fluids"
- -command ("DeleteAllFluids")
- clearFluidsItem;
- }
-
- if(`isTrue "MayaCreatorExists"` && (`licenseCheck -m "edit" -typ "particlePaint"`)) {
- menuItem -d 1;
- menuItem -label "Strokes"
- -annotation "Delete All Strokes"
- -command ("DeleteAllStrokes")
- clearAllStrokesItem;
- }
-
- setParent -menu ..;
-
- menuItem -divider true;
-
- menuItem -label "Select All"
- -annotation "Select All"
- -command ("SelectAll") selectAllItem;
-
- // Select Hierarchy.
- //
- menuItem -label "Select Hierarchy"
- -annotation "Select Hierarchy: Select all the children of the current selection"
- -command ("SelectHierarchy");
-
- menuItem -label "Invert Selection"
- -annotation "Invert Selection"
- -command ("InvertSelection") invertSelectionItem;
-
- // Select all by type sub-menu.
- //
- menuItem -label "Select All by Type" -subMenu true -to true selAllHierItem;
-
- menuItem -label "Joints"
- -annotation "Select All Joints"
- -command ("SelectAllJoints")
- selJointsItem;
-
- menuItem -label "IK Handles"
- -annotation "Select All IK Handles"
- -command ("SelectAllIKHandles")
- selIKHanItem;
-
- menuItem -divider true;
-
- menuItem -label "Lattices"
- -annotation "Select All Lattices"
- -command ("SelectAllLattices");
-
- if ($completeLicense) {
- menuItem -label "Clusters"
- -annotation "Select All Clusters"
- -command ("SelectAllClusters");
-
- menuItem -label "Sculpt Objects"
- -annotation "Select All Sculpt Objects"
- -command ("SelectAllSculptObjects");
-
- menuItem -label "Wires"
- -annotation "Select All Wires"
- -command ("SelectAllWires");
- }
-
- menuItem -divider true;
-
- menuItem -label "Transforms"
- -annotation "Select All Transforms"
- -command ("SelectAllTransforms")
- selDAGItem;
-
- menuItem -label "Geometry"
- -annotation "Select All Geometry"
- -command ("SelectAllGeometry")
- selGeomItem;
-
- menuItem -label "NURBS Curves"
- -annotation "Select All NURBS Curves"
- -command ("SelectAllNURBSCurves")
- selNurbsCurveItem;
-
- menuItem -label "NURBS Surfaces"
- -annotation "Select All NURBS Surfaces"
- -command ("SelectAllNURBSSurfaces")
- selNurbsSurfaceItem;
-
- menuItem -label "Polygon Geometry"
- -annotation "Select All Polygon Geometry"
- -command ("SelectAllPolygonGeometry")
- selPolysItem;
-
- if (`isTrue "SubdivUIExists"`){
- menuItem -label "Subdiv Geometry"
- -annotation "Select All Subdiv Geometry"
- -command ("SelectAllSubdivGeometry")
- selSubdivGeomItem;
- }
-
- menuItem -divider true;
-
- menuItem -label "Lights"
- -annotation "Select All Lights"
- -command ("SelectAllLights")
- selLightsItem;
-
- menuItem -label "Cameras"
- -annotation "Select All Cameras"
- -command ("SelectAllCameras")
- selCamerasItem;
-
- menuItem -label "Image Planes"
- -annotation "Select All Image Planes"
- -command ("SelectAllImagePlanes");
-
- menuItem -divider true;
-
- if( `licenseCheck -m edit -type complete` == 1 )
- {
- menuItem -label "Particles"
- -annotation "Select All Particles"
- -command ("SelectAllParticles")
- selParticlesItem;
-
- menuItem -label "Rigid Bodies"
- -annotation "Select All Rigid Bodies"
- -command ("SelectAllRigidBodies")
- selRigidBodiesItem;
-
- menuItem -label "Rigid Constraints"
- -annotation "Select All Rigid Constraints"
- -command ("SelectAllRigidConstraints")
- selRigidConstraintsItem;
- }
- if( fluidEditLicenseFound() ) {
- menuItem -label "Fluids"
- -annotation "Select All Fluids"
- -command ("SelectAllFluids")
- selFluidsItem;
- }
-
- if(`isTrue "MayaCreatorExists"` && (`licenseCheck -m "edit" -typ "particlePaint"`)) {
- menuItem -d 1;
- menuItem -label "Strokes"
- -annotation "Select All Strokes"
- -command ("SelectAllStrokes")
- selAllStrokesItem;
-
- menuItem -label "Brushes"
- -annotation "Select All Brushes"
- -command ("SelectAllBrushes")
- selAllBrushesItem;
- }
-
- setParent -menu ..;
-
- // Quick Select Sets sub-menu.
- //
- string $menu = `menuItem -label "Quick Select Sets" -sm true selectCharItem`;
- menuItem -e -pmc ( "createCharacterMenu " + $menu ) $menu;
- setParent -menu ..;
-
-
- // Paint Selection tool.
- //
- if (true || `licenseCheck -m "edit" -typ "artisan"` ) {
-
- menuItem -label "Paint Selection Tool"
- -image "artSelect.xpm"
- -ann "Paint Selection Tool: Paint selection of cvs/vertices/faces/edges"
- -command ("ArtPaintSelectTool") artisanPaintSelectItem;
-
- menuItem -optionBox true -image "artSelect.xpm"
- -ann "Paint Selection Tool Option Box"
- -label "Paint Selection Tool Option Box"
- -command ("ArtPaintSelectToolOptions")
- artisanPaintSelectDialogItem;
- }
-
- menuItem -divider true;
-
- // Duplicate.
- //
- menuItem -label "Duplicate"
- -annotation "Duplicate: Duplicate the selected object(s)"
- -dmc "performDuplicate 2"
- -command ("Duplicate") dupItem;
- menuItem -optionBox true
- -annotation "Duplicate Option Box"
- -label "Duplicate Option Box"
- -command ("DuplicateOptions")
- dupOptItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|dupItem");
-
-
- // Duplicate with transforms.
- //
- menuItem -label "Duplicate with Transform"
- -annotation "Duplicate with Transform: Duplicate and apply the last transforms"
- -command ("DuplicateWithTransform") smartDupItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|smartDupItem");
-
- menuItem -divider true;
-
- // Group.
- //
- menuItem -label "Group" -allowOptionBoxes true
- -annotation "Group: Group the selected object(s)"
- -dmc "performGroup 2"
- -command ("Group") groupItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|groupItem");
- menuItem -optionBox true
- -annotation "Group Option Box"
- -label "Group Option Box"
- -command ("GroupOptions") groupOptItem;
-
- // Ungroup.
- //
- menuItem -label "Ungroup" -allowOptionBoxes true
- -annotation "Ungroup: Ungroup the selected object(s)"
- -dmc "performUngroup 2"
- -command ("Ungroup") ungroupItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|ungroupItem");
- menuItem -optionBox true
- -annotation "Ungroup Option Box"
- -label "Ungroup Option Box"
- -command ("UngroupOptions")
- ungrpOptItem;
-
- // Level of Detail sub-menu.
- //
- menuItem -label "Level of Detail" -subMenu true -to true
- levelOfDetailItem;
-
- menuItem -label "Group"
- -image "levelOfDetail.xpm"
- -annotation "Group Level of Detail: Select 2 or more transforms, high resolution first."
- -command ("LevelOfDetailGroup") -ec true lodGroupItem;
-
- menuItem -label "Ungroup"
- -image "levelOfDetailDelete.xpm"
- -annotation "Ungroup Level of Detail: Ungroup the selected Level of Detail object(s)."
- -command ("LevelOfDetailUngroup") -ec true lodRemoveItem;
-
- setParent -menu ..;
-
- menuItem -divider true;
-
- // Parent
- //
- menuItem -label "Parent" -allowOptionBoxes true
- -annotation "Parent: Parent the selected object(s) to the last selected object"
- -dmc "performParent 2"
- -command ("Parent") parentItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|parentItem");
- menuItem -optionBox true
- -annotation "Parent Option Box"
- -label "Parent Option Box"
- -command ("ParentOptions")
- parentOptItem;
-
- // Unparent
- //
- menuItem -label "Unparent" -allowOptionBoxes true
- -annotation "Unparent: Unparent the selected object(s)"
- -dmc "performUnparent 2"
- -command ("Unparent") unparentItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|unparentItem");
- menuItem -optionBox true
- -annotation "Unparent Option Box"
- -label "Unparent Option Box"
- -command ("UnparentOptions")
- unparOptItem;
-
- setParent -menu ..;
- }
-